package com.cjy.common.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * easyui 树数据模型
 * 2013-12-10 下午2:49:27
 * @author hubery.niejinzhen
 */
public class EasyuiTreeNode
{
	private Object					attributes;									// 自定义属性，通常使用为HashMap，但不限定
	private Boolean					checked;										// 选中状态
	private List<EasyuiTreeNode>	children	= new ArrayList<EasyuiTreeNode>();	// 子节点
	private String					iconCls;										// 图片
	private String					id;											// id
	private String					state;											// 打开状态
	private String					text;											// 文本
																					
	/**
	 * 添加孩子节点
	 * @author hubery.niejinzhen
	 * @param pm void
	 */
	public void addChild(EasyuiTreeNode tree)
	{
		children.add(tree);
	}
	
	public Object getAttributes()
	{
		return attributes;
	}
	
	public Boolean getChecked()
	{
		return checked;
	}
	
	public List<EasyuiTreeNode> getChildren()
	{
		return children;
	}
	
	public String getIconCls()
	{
		return iconCls;
	}
	
	public String getId()
	{
		return id;
	}
	
	public String getState()
	{
		return state;
	}
	
	public String getText()
	{
		return text;
	}
	
	public void setAttributes(Object attributes)
	{
		this.attributes = attributes;
	}
	
	public void setChecked(Boolean checked)
	{
		this.checked = checked;
	}
	
	public void setChildren(List<EasyuiTreeNode> children)
	{
		this.children = children;
	}
	
	public void setIconCls(String iconCls)
	{
		this.iconCls = iconCls;
	}
	
	public void setId(String id)
	{
		this.id = id;
	}
	
	public void setState(String state)
	{
		this.state = state;
	}
	
	public void setText(String text)
	{
		this.text = text;
	}
}
